
# 时间参数
ds=$1


# 清空表
mysql -e "truncate ads.dws_app_vio_zqzf;" -uroot -pshujia666888..


sqoop export \
--export-dir /daas/motl/traffic/dws/dws_app_vio_zqzf/ds=$ds \
--columns wfsj,dr_zd_wfs,jn_zd_wfs,zd_tb,dr_zjjs_wfs,jn_zjjs_wfs,zjjs_tb,dr_yjjs_wfs,jn_yjjs_wfs,yjjs_tb,dr_zdhp_wfs,jn_zdhp_wfs,zdhp_tb,dr_wzbz_wfs,jn_wzbz_wfs,wzbz_tb,dr_tpjp_wfs,jn_tpjp_wfs,tpjp_tb,dr_wdtk_wfs,jn_wdtk_wfs,wdtk_tb,dr_jspz_wfs,jn_jspz_wfs,jspz_tb,dr_wxjs_wfs,jn_wxjs_wfs,wxjs_tb,dr_cy_wfs,jn_cy_wfs,cy_tb,dr_cz_wfs,jn_cz_wfs,cz_tb, \
--fields-terminated-by ',' \
--connect 'jdbc:mysql://cdh01:3306/ads?useUnicode=true&characterEncoding=UTF-8&useSSL=false' \
--username root \
--password 'shujia666888..' \
--table dws_app_vio_zqzf \
--num-mappers 1


